package com.zrwl.poscloud.xo.mapper;

import com.zrwl.poscloud.base.entity.CompanyDictData;
import com.zrwl.poscloud.base.superI.SuperMapper;
import com.zrwl.poscloud.xo.vo.CompanyDictDataVO;
import com.zrwl.poscloud.xo.vo.SysDictDataVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商户字典数据 Mapper类
 *
 * @author 刘思童 AutoGenerate
 * @date 2021-04-26
 */
public interface CompanyDictDataMapper extends SuperMapper<CompanyDictData> {
    @Select("<script>" +
            " SELECT DISTINCT b.*,a.model_dict_type_uid" +
            " FROM t_model_dict_data a LEFT JOIN t_sys_dict_data b ON a.model_dict_type_uid=#{param} AND a.company_dict_type_uid=b.uid " +
            " WHERE a.status=1 AND b.status=1 " +
            " ORDER BY b.sort ASC" +
            "</script>"
    )
    public List<SysDictDataVO> getCompanyDictList(@Param("param") String companyDictTypeUid);
    public List<CompanyDictDataVO> getCompanyModelType(@Param("sysDictType") String sysDictType);
}
